<template>
  <view class="contenter">
    <view style="height: 40rpx"></view>
    <view class="u-flex flex-column flex_bt pas">
      <u-input v-model="form.password" placeholder="请输入当前密码" type="password"  />
      <u-input v-model="form.new_password" placeholder="请输入新密码" type="password"   />
    </view>
    <view class="bt" @click="submit">确认</view>
  </view>
</template>

<script>
export default {
  name: "newPassword",
  data(){
    return{
      form:{
        password:'',
        new_password:''
      }
    }
  },
  methods:{
    submit(){
      this.$api.updatePwd(this.form).then(res=>{
        this.$u.toast('修改成功')
      })
    }
  }
}
</script>

<style scoped lang="scss">
  .pas{
    height: 200rpx;
    width: 686rpx;
    border-radius: 12rpx;
    background: white;
    margin: 0 auto;
    flex-flow: column;
    flex: 1;
    /deep/.u-input{
      align-items: center;
      width: 640rpx;
      height: 100rpx;
      padding-left: 24rpx !important;
      border-bottom: 2rpx solid $uni-border-color;
      &:last-child{
        border-bottom: 0;
      }
    }

  }
  .bt{
    width: 590rpx;
    height: 78rpx;
    background:$uni-color-primary;
    border-radius: 40rpx;
    text-align: center;
    margin: 0 auto;
    line-height: 78rpx;
    font-size: 28rpx;
    color: white;
    margin-top: 200rpx;
  }
</style>